
#ifndef __LIBERTY_LIBRARY_PROJECT_H__
#define __LIBERTY_LIBRARY_PROJECT_H__

#include <Liberty3D/Liberty3D.h>
#include <Liberty3D/Library/IAssetDepot.h>
#include <Liberty3D/Library/IMutex.h>
#include <Liberty3D/Engine/Uuid.h>

#include <string>
#include <unordered_map>

namespace Liberty { namespace Library {
    class AssetImporter;

    class Project : public std::enable_shared_from_this<Project> {
        friend class AssetImporter;

    protected:
        std::shared_ptr<IAssetDepot>          _depot;
        mutable std::shared_ptr<ISharedMutex> _mutex;

    public:
        Project(const std::string& path, bool create = false);
        virtual ~Project();

    public:
        inline std::shared_ptr<IAssetDepot>         depot() const { return _depot; }
        inline const std::shared_ptr<ISharedMutex>& mutex() const { return _mutex; }

        std::string           pathForUuid(const Liberty::Engine::Uuid& uuid) const;
        Liberty::Engine::Uuid uuidForPath(const std::string& fileName) const;

        virtual void save();
    };
    
}}

#endif
